//package cn.lh.conmon;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//
//import java.sql.Connection;
//import java.sql.DriverManager;
//import java.sql.SQLException;
//
///**
// * @描述:
// * @版权: Copyright (c) 2023
// * @作者: linhong
// * @版本: 1.0.0
// * @创建时间: 2023/12/18
// */
//@Component
//@Slf4j
//public class MySQLConnection {
//
////        @PostConstruct
//        public  void connection() {
//            String url = "jdbc:mysql://172.31.241.170:3306/test";
//            String username = "root";
//            String password = "null123";
//
//            try {
//                Connection connection = DriverManager.getConnection(url, username, password);
//                log.info("Connected to the MySQL database.");
//                System.err.println("Connected to the MySQL database.");
//            } catch (SQLException e) {
//                log.info("Failed to connect to the MySQL database.");
//                System.err.println("Failed to connect to the MySQL database.");
//                e.printStackTrace();
//            }
//        }
//}
